<?php
/*
 * 
 * 	NUBERU CMS (2011)
 * 
 * 	Aitor González Fernández
 * 	http://proyectsource.tk
 * 
 * */

/* *********** Control de entrada ****************************** */

if (defined('NUBERU')){
	header("Location: ../index.php");
	die();
}

switch ($_GET['error']) {
	case 403:
		define ( 'ERROR', 403 ); 
		define ( 'ERROR_MSG', 'You don\'t have permission to access this page.' );
		break;
		
	case 404:
		define ( 'ERROR', 404 ); 
		define ( 'ERROR_MSG', 'File not found.' );
		break;
		
	case 700:
		define ( 'ERROR_MSG', 'Internal Web error.' );
	case 701:
		define ( 'ERROR', 701 ); 
		break;
		
		
	case 720: 
		define ( 'ERROR_MSG', 'Internal MYSQL error.' );
	case 721:
		define ( 'ERROR', 721 );
		break;
		
	default:
		define ( 'ERROR', -1 ); 
		define ( 'ERROR_MSG', 'Unknow error.' );
		break;
}
 
/* ************************************************************* */

echo ('
	<html>
		<head>
			<title>Error ' . ERROR . '</title>
		</head>
		<body>
			<p>
				<h1> Error ' . ERROR . '</h1>
				<h3> An error has ocurred. Error message: ' . ERROR_MSG .  '</h3>
			</p>
			<p>
				Click <a href="javascript:history.back()">here</a> to return.
			</p>
		</body>
	</html>
	');

?>
